package org.w515.lab0_backend.common;

public enum ErrorCode {
    SUCCESS(0, "OK"),
    BAD_REQUEST(400, "Bad Request"),
    UNAUTHORIZED(401, "Unauthorized"),
    FORBIDDEN(403, "Forbidden"),
    NOT_FOUND(404, "Not Found"),
    CONFLICT(409, "Conflict"),
    VALIDATION_ERROR(422, "Validation Error"),
    SERVER_ERROR(500, "Internal Server Error"),
    BUSINESS_ERROR(1001, "Business Error");

    private final int code;
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() { return code; }
    public String getMessage() { return message; }
}